Optimal. Leaf size=177 \[ \frac{4 \cot ^9(c+d x)}{9 a^3 d}-\frac{\cot ^7(c+d x)}{7 a^3 d}+\frac{\cot ^5(c+d x)}{5 a^3 d}-\frac{\cot ^3(c+d x)}{3 a^3 d}+\frac{\cot (c+d x)}{a^3 d}-\frac{4 \csc ^9(c+d x)}{9 a^3 d}+\frac{15 \csc ^7(c+d x)}{7 a^3 d}-\frac{21 \csc ^5(c+d x)}{5 a^3 d}+\frac{13 \csc ^3(c+d x)}{3 a^3 d}-\frac{3 \csc (c+d x)}{a^3 d}+\frac{x}{a^3} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.253495, antiderivative size = 177, normalized size of antiderivative = 1., number of steps used = 17, number of rules used = 9, integrand size = 21, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.429, Rules used = {3888, 3886, 3473, 8, 2606, 194, 2607, 30, 270} \[ \frac{4 \cot ^9(c+d x)}{9 a^3 d}-\frac{\cot ^7(c+d x)}{7 a^3 d}+\frac{\cot ^5(c+d x)}{5 a^3 d}-\frac{\cot ^3(c+d x)}{3 a^3 d}+\frac{\cot (c+d x)}{a^3 d}-\frac{4 \csc ^9(c+d x)}{9 a^3 d}+\frac{15 \csc ^7(c+d x)}{7 a^3 d}-\frac{21 \csc ^5(c+d x)}{5 a^3 d}+\frac{13 \csc ^3(c+d x)}{3 a^3 d}-\frac{3 \csc (c+d x)}{a^3 d}+\frac{x}{a^3} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3888
Rule 3886
Rule 3473
Rule 8
Rule 2606
Rule 194
Rule 2607
Rule 30
Rule 270
Rubi steps
\begin{align*} \int \frac{\cot ^4(c+d x)}{(a+a \sec (c+d x))^3} \, dx &=\frac{\int \cot ^{10}(c+d x) (-a+a \sec (c+d x))^3 \, dx}{a^6}\\ &=\frac{\int \left (-a^3 \cot ^{10}(c+d x)+3 a^3 \cot ^9(c+d x) \csc (c+d x)-3 a^3 \cot ^8(c+d x) \csc ^2(c+d x)+a^3 \cot ^7(c+d x) \csc ^3(c+d x)\right ) \, dx}{a^6}\\ &=-\frac{\int \cot ^{10}(c+d x) \, dx}{a^3}+\frac{\int \cot ^7(c+d x) \csc ^3(c+d x) \, dx}{a^3}+\frac{3 \int \cot ^9(c+d x) \csc (c+d x) \, dx}{a^3}-\frac{3 \int \cot ^8(c+d x) \csc ^2(c+d x) \, dx}{a^3}\\ &=\frac{\cot ^9(c+d x)}{9 a^3 d}+\frac{\int \cot ^8(c+d x) \, dx}{a^3}-\frac{\operatorname{Subst}\left (\int x^2 \left (-1+x^2\right )^3 \, dx,x,\csc (c+d x)\right )}{a^3 d}-\frac{3 \operatorname{Subst}\left (\int x^8 \, dx,x,-\cot (c+d x)\right )}{a^3 d}-\frac{3 \operatorname{Subst}\left (\int \left (-1+x^2\right )^4 \, dx,x,\csc (c+d x)\right )}{a^3 d}\\ &=-\frac{\cot ^7(c+d x)}{7 a^3 d}+\frac{4 \cot ^9(c+d x)}{9 a^3 d}-\frac{\int \cot ^6(c+d x) \, dx}{a^3}-\frac{\operatorname{Subst}\left (\int \left (-x^2+3 x^4-3 x^6+x^8\right ) \, dx,x,\csc (c+d x)\right )}{a^3 d}-\frac{3 \operatorname{Subst}\left (\int \left (1-4 x^2+6 x^4-4 x^6+x^8\right ) \, dx,x,\csc (c+d x)\right )}{a^3 d}\\ &=\frac{\cot ^5(c+d x)}{5 a^3 d}-\frac{\cot ^7(c+d x)}{7 a^3 d}+\frac{4 \cot ^9(c+d x)}{9 a^3 d}-\frac{3 \csc (c+d x)}{a^3 d}+\frac{13 \csc ^3(c+d x)}{3 a^3 d}-\frac{21 \csc ^5(c+d x)}{5 a^3 d}+\frac{15 \csc ^7(c+d x)}{7 a^3 d}-\frac{4 \csc ^9(c+d x)}{9 a^3 d}+\frac{\int \cot ^4(c+d x) \, dx}{a^3}\\ &=-\frac{\cot ^3(c+d x)}{3 a^3 d}+\frac{\cot ^5(c+d x)}{5 a^3 d}-\frac{\cot ^7(c+d x)}{7 a^3 d}+\frac{4 \cot ^9(c+d x)}{9 a^3 d}-\frac{3 \csc (c+d x)}{a^3 d}+\frac{13 \csc ^3(c+d x)}{3 a^3 d}-\frac{21 \csc ^5(c+d x)}{5 a^3 d}+\frac{15 \csc ^7(c+d x)}{7 a^3 d}-\frac{4 \csc ^9(c+d x)}{9 a^3 d}-\frac{\int \cot ^2(c+d x) \, dx}{a^3}\\ &=\frac{\cot (c+d x)}{a^3 d}-\frac{\cot ^3(c+d x)}{3 a^3 d}+\frac{\cot ^5(c+d x)}{5 a^3 d}-\frac{\cot ^7(c+d x)}{7 a^3 d}+\frac{4 \cot ^9(c+d x)}{9 a^3 d}-\frac{3 \csc (c+d x)}{a^3 d}+\frac{13 \csc ^3(c+d x)}{3 a^3 d}-\frac{21 \csc ^5(c+d x)}{5 a^3 d}+\frac{15 \csc ^7(c+d x)}{7 a^3 d}-\frac{4 \csc ^9(c+d x)}{9 a^3 d}+\frac{\int 1 \, dx}{a^3}\\ &=\frac{x}{a^3}+\frac{\cot (c+d x)}{a^3 d}-\frac{\cot ^3(c+d x)}{3 a^3 d}+\frac{\cot ^5(c+d x)}{5 a^3 d}-\frac{\cot ^7(c+d x)}{7 a^3 d}+\frac{4 \cot ^9(c+d x)}{9 a^3 d}-\frac{3 \csc (c+d x)}{a^3 d}+\frac{13 \csc ^3(c+d x)}{3 a^3 d}-\frac{21 \csc ^5(c+d x)}{5 a^3 d}+\frac{15 \csc ^7(c+d x)}{7 a^3 d}-\frac{4 \csc ^9(c+d x)}{9 a^3 d}\\ \end{align*}
Mathematica [B] time = 1.17305, size = 366, normalized size = 2.07 \[ \frac{\csc \left (\frac{c}{2}\right ) \sec \left (\frac{c}{2}\right ) \csc ^3(2 (c+d x)) (675036 \sin (c+d x)+506277 \sin (2 (c+d x))-37502 \sin (3 (c+d x))-225012 \sin (4 (c+d x))-112506 \sin (5 (c+d x))-18751 \sin (6 (c+d x))-431424 \sin (2 c+d x)-375552 \sin (c+2 d x)-201600 \sin (3 c+2 d x)-41248 \sin (2 c+3 d x)+84000 \sin (4 c+3 d x)+155712 \sin (3 c+4 d x)+100800 \sin (5 c+4 d x)+98016 \sin (4 c+5 d x)+30240 \sin (6 c+5 d x)+21376 \sin (5 c+6 d x)-181440 d x \cos (2 c+d x)+136080 d x \cos (c+2 d x)-136080 d x \cos (3 c+2 d x)-10080 d x \cos (2 c+3 d x)+10080 d x \cos (4 c+3 d x)-60480 d x \cos (3 c+4 d x)+60480 d x \cos (5 c+4 d x)-30240 d x \cos (4 c+5 d x)+30240 d x \cos (6 c+5 d x)-5040 d x \cos (5 c+6 d x)+5040 d x \cos (7 c+6 d x)-169344 \sin (c)-338112 \sin (d x)+181440 d x \cos (d x))}{80640 a^3 d (\sec (c+d x)+1)^3} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.079, size = 151, normalized size = 0.9 \begin{align*} -{\frac{1}{576\,d{a}^{3}} \left ( \tan \left ({\frac{dx}{2}}+{\frac{c}{2}} \right ) \right ) ^{9}}+{\frac{1}{56\,d{a}^{3}} \left ( \tan \left ({\frac{dx}{2}}+{\frac{c}{2}} \right ) \right ) ^{7}}-{\frac{29}{320\,d{a}^{3}} \left ( \tan \left ({\frac{dx}{2}}+{\frac{c}{2}} \right ) \right ) ^{5}}+{\frac{1}{3\,d{a}^{3}} \left ( \tan \left ({\frac{dx}{2}}+{\frac{c}{2}} \right ) \right ) ^{3}}-{\frac{99}{64\,d{a}^{3}}\tan \left ({\frac{dx}{2}}+{\frac{c}{2}} \right ) }+2\,{\frac{\arctan \left ( \tan \left ( 1/2\,dx+c/2 \right ) \right ) }{d{a}^{3}}}-{\frac{1}{192\,d{a}^{3}} \left ( \tan \left ({\frac{dx}{2}}+{\frac{c}{2}} \right ) \right ) ^{-3}}+{\frac{1}{8\,d{a}^{3}} \left ( \tan \left ({\frac{dx}{2}}+{\frac{c}{2}} \right ) \right ) ^{-1}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.61626, size = 239, normalized size = 1.35 \begin{align*} -\frac{\frac{\frac{31185 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - \frac{6720 \, \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}} + \frac{1827 \, \sin \left (d x + c\right )^{5}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{5}} - \frac{360 \, \sin \left (d x + c\right )^{7}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{7}} + \frac{35 \, \sin \left (d x + c\right )^{9}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{9}}}{a^{3}} - \frac{40320 \, \arctan \left (\frac{\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1}\right )}{a^{3}} - \frac{105 \,{\left (\frac{24 \, \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} - 1\right )}{\left (\cos \left (d x + c\right ) + 1\right )}^{3}}{a^{3} \sin \left (d x + c\right )^{3}}}{20160 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.48758, size = 566, normalized size = 3.2 \begin{align*} \frac{668 \, \cos \left (d x + c\right )^{6} + 1059 \, \cos \left (d x + c\right )^{5} - 573 \, \cos \left (d x + c\right )^{4} - 1813 \, \cos \left (d x + c\right )^{3} - 393 \, \cos \left (d x + c\right )^{2} + 315 \,{\left (d x \cos \left (d x + c\right )^{5} + 3 \, d x \cos \left (d x + c\right )^{4} + 2 \, d x \cos \left (d x + c\right )^{3} - 2 \, d x \cos \left (d x + c\right )^{2} - 3 \, d x \cos \left (d x + c\right ) - d x\right )} \sin \left (d x + c\right ) + 789 \, \cos \left (d x + c\right ) + 368}{315 \,{\left (a^{3} d \cos \left (d x + c\right )^{5} + 3 \, a^{3} d \cos \left (d x + c\right )^{4} + 2 \, a^{3} d \cos \left (d x + c\right )^{3} - 2 \, a^{3} d \cos \left (d x + c\right )^{2} - 3 \, a^{3} d \cos \left (d x + c\right ) - a^{3} d\right )} \sin \left (d x + c\right )} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \frac{\int \frac{\cot ^{4}{\left (c + d x \right )}}{\sec ^{3}{\left (c + d x \right )} + 3 \sec ^{2}{\left (c + d x \right )} + 3 \sec{\left (c + d x \right )} + 1}\, dx}{a^{3}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.44733, size = 177, normalized size = 1. \begin{align*} \frac{\frac{20160 \,{\left (d x + c\right )}}{a^{3}} + \frac{105 \,{\left (24 \, \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2} - 1\right )}}{a^{3} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{3}} - \frac{35 \, a^{24} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{9} - 360 \, a^{24} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{7} + 1827 \, a^{24} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{5} - 6720 \, a^{24} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{3} + 31185 \, a^{24} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )}{a^{27}}}{20160 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]